program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var

 To_sort : array of Integer;

 N : Integer;

 procedure Qsort(L, R : Integer);
   var
       X , I, J, G, Swap : Integer;
   begin
     X:= (L + R) div 2;
     X := To_sort[X];
     I := L;
     J := R;
     repeat

         while(To_sort[I] < x) do begin
             I := I + 1; end;
         while(To_sort[J] > X) do begin
             J := J - 1;end;
         if((I < X)  and (I <= J))  then begin
             Swap := To_sort[I];
             To_sort[I] := To_sort[J];
             To_sort[J] := Swap;
             I := (I + 1);
             J := (J - 1);end;
     until(I > J);
     if(L < J) then
         Qsort(L, J);
     if(R > i) then
         Qsort(I, R);end;





var
  I : Integer;
  Input, Output : TextFile;

begin
  AssignFile(Input, 'Input.txt');
  Reset(Input);
  AssignFile(Output, 'Output.txt');
  Rewrite(Output);
  Readln(N);
  SetLength(To_sort, N);
  For I := 0 to N - 1 do
      read(To_sort[I]);
  Qsort(0, N - 1);
  for I := 0 to N - 1 do
      write(To_sort[I],' ');


end.
